package com.syni.mdd.yhd.common.all.controller.protect;

import com.syni.mdd.sjb.common.component.utils.common.annotations.EntranceCheck;
import com.syni.mdd.yhd.common.all.dto.requestDto.operation.UserOperationReDto;
import com.syni.mdd.yhd.common.all.service.BmsUserOperationLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/userOperationLog")
public class BmsUserOperationLogController {

    @Autowired
    BmsUserOperationLogService bmsUserOperationLogService;

    /**
     * @Description: 用户操作记录
     * @Param: user_id(用户id)
     * @Param: operation_type(操作类型)
     * @return: Map
     * @Author: cfx
     * @Date: 2019/4/8
     */
    @EntranceCheck
    @PostMapping("/recordUserOperation")
    public Map<String,Object> recordUserOperation(@RequestBody UserOperationReDto userOperationReDto){
        return bmsUserOperationLogService.recordUserOperation(userOperationReDto);
    }
}
